package com.asdc.autoscanfiles.utils;

public class Test {

	public static void main(String[] args) {
		StringBuffer sql = new StringBuffer("SELECT i.id, i.level1, d1.text AS level1Name, ");
        sql.append("i.level2, d2.text AS level2Name, i.level3, d3.text AS level3Name, ");
        sql.append("i.begin_date, i.end_date, i.element_type, d4.text AS elementName, ");
        sql.append("i.area_number, d5.text AS areaName, i.file_name, i.type, i.new_path ,i.type_value AS typeValue ,i.sheng as sheng ");
        sql.append("FROM `img_file` i LEFT JOIN dict d1 ON d1.`code` = i.level1 ");
        sql.append("LEFT JOIN dict d2 ON d2.`code` = i.level2 LEFT JOIN dict d3 ON d3.`code` = i.level3 ");
        sql.append("LEFT JOIN dict d4 ON d4.`code` = i.element_type LEFT JOIN dict d5 ON d5.`code` = i.area_number ");
        sql.append("WHERE i.id > ").append(100);
        sql.append(" LIMIT ").append(0).append(",10000");
        System.out.println(sql);

	}

}
